<%@ page import="java.sql.Statement" import="java.sql.ResultSet" import="java.sql.Connection" %>
<%@page import="connection.DBConnection"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Purchase Invoice Outstanding</title>
</head>
<body>

<form>
<table border=2>
<tr>
		<td>Date </td>
    	<td>Invoice Number </td>
    	<td>Amount Outstanding </td>
    	<td>Amount Adjusted</td>
</tr>

		<%  DBConnection dbc=new DBConnection();
			Connection con=dbc.getNewConnection();
			Statement st = null;
			ResultSet rs = null;
			
			try
			{
			   st=con.createStatement() ;
       		   rs=st.executeQuery("select date,pvinno,pvtota from PurchaseVoucher"); %>
	        	
       		 <%  while(rs.next()){ %>
<tr>
            		<td><%= rs.getString(1)%></td>
            		<td><%= rs.getString(2)%></td>
            		<td><%= rs.getDouble(3)%></td>
</tr>
        		<% } %>
  
	 		<% }
			catch(Exception e){} %>

</table>
</form>

</body>
</html>